package pers.emok.springcloud.servicefeignconsumer.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
import pers.emok.springcloud.servicefeignapi.api.EchoApi;

import javax.annotation.Resource;

@RestController
public class DemoController {

    @Resource
    EchoApi echoApi;

    @GetMapping("/demo/{data}")
    public String demo(@PathVariable String data) {
        //
        return  "demo/"+echoApi.echo(data);
    }


}
